package com.bootdo.market.service.impl;

import com.bootdo.market.dao.CommonDao;
import com.bootdo.market.dao.ProductAdvertisementDao;
import com.bootdo.market.domain.ProductAdvertisementDO;
import com.bootdo.market.service.ProductAdvertisementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service
public class ProductAdvertisementServiceImpl implements ProductAdvertisementService {
    @Autowired
    private ProductAdvertisementDao productAdvertisementDao;
    @Autowired
    private CommonDao commonDao;

    @Override
    public ProductAdvertisementDO get(Integer id) {
        return productAdvertisementDao.get(id);
    }

    @Override
    public List<ProductAdvertisementDO> list(Map<String, Object> map) {
        return productAdvertisementDao.list(map);
    }

    @Override
    public int count(Map<String, Object> map) {
        return productAdvertisementDao.count(map);
    }

    @Override
    public int save(ProductAdvertisementDO productAdvertisement) {
        return productAdvertisementDao.save(productAdvertisement);
    }

    @Override
    public int update(ProductAdvertisementDO productAdvertisement) {
        return productAdvertisementDao.update(productAdvertisement);
    }

    @Override
    public int remove(Integer id) {
        return productAdvertisementDao.remove(id);
    }

    @Override
    public int batchRemove(Integer[] ids) {
        return productAdvertisementDao.batchRemove(ids);
    }

    @Override
    public List<ProductAdvertisementDO> productChannelList(Map<String, Object> map) {
        return productAdvertisementDao.productChannelList(map);
    }

    @Override
    public int productChannelListCount(Map<String, Object> map) {
        return productAdvertisementDao.productChannelListCount(map);
    }

    @Override
    public List<ProductAdvertisementDO> productAdvpositionList(Map<String, Object> map) {
        return productAdvertisementDao.productAdvpositionList(map);
    }

    @Override
    public int productAdvpositionListCount(Map<String, Object> map) {
        return productAdvertisementDao.productAdvpositionListCount(map);
    }

    @Override
    public ProductAdvertisementDO getDataShow(ProductAdvertisementDO productAdvertisement) {
        return commonDao.getDataShow(productAdvertisement);
    }

    @Override
    public int insertOfferArea(List<Map<String, Object>> mapList) {
        return productAdvertisementDao.insertOfferArea(mapList);
    }

    @Override
    public ProductAdvertisementDO findValidData(ProductAdvertisementDO productAdvertisement) {
        return productAdvertisementDao.findValidData(productAdvertisement);
    }

    @Override
    public List<Map<String, String>> findAreaByOfferId(Integer id) {
        return productAdvertisementDao.findAreaByOfferId(id);
    }

    @Override
    public int deleteOfferAreaByOfferId(Integer id) {
        return productAdvertisementDao.deleteOfferAreaByOfferId(id);
    }


}
